package com.fmjava.service_video.controller;

import com.fmjava.utils.ResponseResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

/*
 *@ClassName LoginController
 *@Description TODO
 *@Author 吃麻椒的花酱
 *@Date 2021/7/4 20:48
 *@Version 1.0
 */
@RestController
@Api(tags = "用户登录组")
@RequestMapping("/service_video/user")
public class LoginController {

    @PostMapping("/login")
    @ApiOperation(value = "用户登录")
    public ResponseResult login() {

        return ResponseResult.ok().data("token","admin-token");
    }

    @GetMapping("/info")
    @ApiOperation(value = "用户信息")
    public ResponseResult info() {

        return ResponseResult.ok().data("roles","['admin']")
                                  .data("introduction","I am a super administrator")
               .data("avatar","https://wpimg.wallstcn.com/f778738c-e4f8-4870-b634-56703b4acafe.gif")
                .data("name","flower");
    }
}
